import { LAYER_CHANGE_TYPE } from "../common/GameConfig";
import LayerStatic from "../common/LayerStatic";
import PanelBase from "../common/PanelBase";
import EventManager from "../core/event/EventManager";
import { Event_Name, event_mgr } from "../core/event/event_mgr";
import Game from "./Game";
import Global1 from "./http/Global1";


const { ccclass, property } = cc._decorator;

@ccclass
export default class xuanguanItem extends PanelBase {

    // @property
    // text: string = 'hello';
    /** 开 */
    @property(cc.Node) kai: cc.Node = null;
    /** 关卡数 */
    @property(cc.Label) num: cc.Label = null;





    onLoad() {

    }



    start() {

    }
    /**
     * 
     * @param index          0 1 2 3 4 5 6 7 8 9 
     * @param Global1.MaxLv  1 2 3 4 5 6 7 8 9 10
     * 
     */

    setAll(index) {
        if (index <= Global1.MaxLv) {
            this.kai.active = true;
        } else {
            this.kai.active = false;
        }
        this.num.string = index + 1;
    }

    clickBut() {
        Global1.Lv = Number(this.num.string);

    }






    // update (dt) {}
}
